package cz.proks.bank.client;

import java.math.BigDecimal;
import java.util.List;

import javax.xml.ws.WebServiceException;

import cz.cvut.felk.support.aos.sw.exchangerates.ExchangeRates;
import cz.cvut.felk.support.aos.sw.exchangerates.ExchangeRatesImplService;
import cz.cvut.felk.support.aos.sw.exchangerates.UnsupportedCurrencyFault_Exception;

public class ExchangeRatesServiceClient implements ExchangeRates {		
	private final ExchangeRates client;
	
	public ExchangeRatesServiceClient() throws WebServiceException {		
		ExchangeRatesImplService ss = new ExchangeRatesImplService();
		client = ss.getExchangeRatesImplPort();		
	}

	public BigDecimal getExchangeRate(String fromCurrency, String toCurrency)
			throws UnsupportedCurrencyFault_Exception {
		return client.getExchangeRate(fromCurrency, toCurrency);
	}

	public List<String> getSupportedCurrencies() {
		return client.getSupportedCurrencies();
	}
}
